<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.bci.pwtz.common.util.SpringUtil" %>
<%@ page import="com.bci.pwtz.service.ExcelUtilService" %>
<%@ page import="com.bci.pwtz.common.ActionCodeConstants" %>
<%@ page import="java.util.List" %>
<%@ page import="com.bci.pwtz.mysql.model.ExportTemplate" %>
<%
	ExcelUtilService excelUtilService = (ExcelUtilService)SpringUtil.getBean("excelUtilService");
	List<ExportTemplate> exportTemplateList = excelUtilService.selectTemplate();
%>
<%@ include file="/user/common.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>数据导入导出</title>
<link href="<%=basePath %>user/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>user/css/llcss.css" rel="stylesheet" type="text/css"/>

<script type="text/javascript" src="<%=basePath %>js/jquery/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=basePath %>js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=basePath %>user/js/hd_ll.js"></script>
<script type="text/javascript" src="<%=basePath %>user/m/js/export.js"></script>
<script type="text/javascript" src="<%=basePath %>js/ajaxfileupload.js"></script>
<script type="text/javascript" src="<%=basePath %>js/global.js"></script>

<style type="">
.but {
	display: block;
	background: url(../images/login_btn.png) no-repeat;
	width: 200px;
	height: 50px;
	line-height: 50px;
	font-size: 20px;
	color: #ffffff;
	text-align: center;
}
</style>
<script type="text/javascript" >
function selectLoad(){
	deviceTypeStart();
}
</script>
</head>
<body bgcolor="white" onload="selectLoad()">
<div id="excelAddBox" class="add_members_box" style="display: none;width: 435px;">
	<div class="add_members_box_title">
	</div>
	<div id="dh" style="overflow: auto;height:500px;">
	<div class="add_members_cont_box">
		<div class="add_members_cont_title">
			<ul class="add_members_cont_title_ul">
				<li class="number" style="width: 15%">失败序号</li>
				<li class="username" style="width: 80%">失败信息</li>
			</ul>
		</div>
		<!-- 成员列表_begin -->
		<div id="errorContent">
			
		</div>
		<!-- 成员列表_end -->
	</div>
	<!-- 添加成员列表内容_end -->
	</div>
</div>
	<%@ include file="/user/head.jsp"%>
	<div class="pwsj_cont_box">
		<%@ include file="/user/left.jsp"%>
		<div class="pwsj_cont_right_box">
		<%if(companyUser != null){ %>
		<!-- 数据导入导出整体_begin -->
		<div class="data_imp_exp_box">			
			<div class="pwsj_right_sjdrdc_title">配网数据>数据导入导出</div><!-- 位置信息 -->
			<!-- 导入导出按钮_begin -->
			<div class="pwsj_sjdrdc_btn">
				<ul class="pwsj_sjdrdc_btn_ul">
					<li id="pwsj_sjdrdc_dataimp_btn" class="pwsj_sjdrdc_btn_li_cur">数据导入</li>
					<li id="pwsj_sjdrdc_dataexp_btn" class="pwsj_sjdrdc_btn_li">数据导出</li>
					<div class="clear"></div>
				</ul>
			</div>
			<!-- 导入导出按钮_end -->

			<!-- 数据导入导出内容_begin -->
			<div class="sjdrdc-cont_box">				
				<!-- 数据导入DIV_begin -->
				<div id="data_imp_box" class="data_imp_box">					
					<!-- 横排按钮、文本框_begin -->
						<div class="selection">
							电压等级:
							<select class="select_down" id="voltagelevel">  
									<option value ="0">中压</option>
									<option value ="1">低压</option>  					
							</select>
							设备类型:
							<select class="select_down" id="devicetype">  
									<option value ="0" selected="selected">设备类型</option>  					
							</select>
							导入模板:
							<select class="select_down" id="importid">  
									<option value ="0" selected="selected">模板类型</option>  					
							</select>
							<!-- <input type="text" id="data_imp_file_text" class="file_text">
							<input type="button" id="data_imp_file_select" class="btn" value="选择" onclick="document.getElementById('userFile').click();" />
							<input type="submit" class="btn" value="上传" onclick="batchadd();" />
							<input type="file" name="userFile" id="userFile"  style="display: none" /> -->
							<input type="file" name="userFile" id="userFile" />
							<input type="submit" value="上传" onclick="batchadd();" />
						</div>												
					<!-- 横排按钮、文本框_end -->					
					<!-- 导入进度GIF_begin -->
					<div class="progress_bar" style="display:none;" id="importimg">
						<p>数据正在导入，请您稍后...</p>
						<div class="gif"><img src="../images/downloading.gif" alt="" />&nbsp;&nbsp;</div>
					</div>
					<!-- 导入进度GIF_end -->
					<!-- 导入导出帮助_begin -->
					<div class="help">
						<div class="help_title">导入帮助</div>
						<div class="help_cont">
							<ul class="help_cont_ul">
								<li class="help_cont_li">1. 您可以使用本系统提供的导入模板，填写好配网数据后再进行批量导入。<a href="<%=basePath %>template/导入模板PMS -综合.xls" style="text-decoration: underline;">下载导入模板</a></li>
								<li class="help_cont_li">2. 您可以使用PMS导出的数据直接进行导入。</li>
							</ul>
						</div>
					</div>
					<!-- 导入导出帮助_end -->
				</div>
				<!-- 数据导入DIV_end -->

				<!-- 数据导出DIV_begin -->
				<div id="data_exp_box" class="data_imp_box" style="display:none;">					
					<!-- 横排按钮、文本框_begin -->
					<div class="selection">
							导出模板:
							<select class="select_down" id="exportselect"> 
							<%if(exportTemplateList.size() > 0){ 
								for(int i=0;i<exportTemplateList.size();i++){
							%> 
									<option value ="<%=exportTemplateList.get(i).getTemplateId() %>" selected="selected"><%=exportTemplateList.get(i).getTemplateName() %></option>  
							<%} }%>				
							</select>
							导出类型：
							<select class="select_down" id="exportType">
								<option value="1">仅数据</option>
								<option value="2">仅图片</option>
								<option value="0">数据和图片</option>
								<option value="3">GIS图片</option>
							</select>
							<input name="beginTime" id="beginTime" class="select_date" placeholder="开始时间" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" type="text" />
							<input name="endTime" id="endTime" class="select_date" placeholder="结束时间" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" type="text" />							
							<input type="submit" class="btn" value="导出" onclick="javasrcipt:exportExcel();"/>
					</div>
					<!-- 横排按钮、文本框_end -->					
					<!-- 导入进度GIF_begin -->
					<div class="progress_bar" style="display:none;" id="exportimg">
						<p>数据正在导出，请您稍后...</p>
						<div class="gif"><img src="../images/downloading.gif" alt="" />&nbsp;&nbsp;</div>
					</div>
					<!-- 导入进度GIF_end -->
					<!-- 导入导出帮助_begin -->
					<div class="help">
						<div class="help_title">导出帮助</div>
						<div class="help_cont">
							<ul class="help_cont_ul">
								<li class="help_cont_li">1. 请选择导出模板，即可进行所有数据的导出。</li>
								<li class="help_cont_li">2. 营销坐标点导出模板，可不选择导出类型和导出时间，系统默认导出全部数据。</li>
								<li class="help_cont_li">3. 温馨提示：数据量越大，导出所需的时间越多。</li>
							</ul>
						</div>
					</div>
					<!-- 导入导出帮助_end -->
				</div>
				<!-- 数据导出DIV_end -->
			</div>
			<!-- 数据导入导出内容_end -->
		</div>
		<!-- 数据导入导出整体_end -->
		<%} %>
		</div>
		<!--main_right end-->
		<div class="clear"></div>
	</div>
	<!--main end-->
	<%@ include file="/user/foot.jsp"%>
</body>
</html>